Active desktop help

Discussion in 'Windows Desktop Systems' started by Dubbin1, Apr 3, 2003.

  1. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    I just built a new computer and I am tring to get my active desktop to work on it. I created one on my old computer and had no problems. On this computer I cant get any programs to launch. I can get files and such to open like explorer, my computer,control panel and my D drive. Im sure I have the .vbs files done right and I have created new shortcuts in the windows folder by using the file new shortcut. I have also tried putting the path to the program in the .vbs with no luck. I am using ntfs files system and am doing everything the same way as I did on my old computer.

    Here is what the vbs looks like

    Dim oShell
    Set oShell = WScript.CreateObject ("WScript.shell")
    oShell.run "C:\Program Files\Winamp\winamp.exe"
    Set oShell = Nothing

    or

    Dim oShell
    Set oShell = WScript.CreateObject ("WScript.shell")
    oShell.run "winamp"
    Set oShell = Nothing

    When I try the first one I get this
    [​IMG]

    When I try the second one nothing happens at all.
     
  2. Lighter

    Lighter . . . . . . . . .

    Messages:
    229
    Location:
    NYC
  3. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    I have already been thru that entire thread and I have also tried to get all kinds of programs to run.
     
  4. madmax1345

    madmax1345 Guest

    This may be a dumb question but is your shortcut named the same as what is in your .vbs file.

    Example:
    .vbs file:

    Dim oShell
    Set oShell = WScript.CreateObject ("WScript.shell")
    oShell.run "winamp"
    Set oShell = Nothing


    So your short cut should be named "winamp" without quotes.
     
  5. Lighter

    Lighter . . . . . . . . .

    Messages:
    229
    Location:
    NYC
    HTML header script:

    <script>
    function exec (command) {
    if (document.layers && navigator.javaEnabled()) {
    window._command = command;
    window.oldOnError = window.onerror;
    window.onerror = function (err) {
    if (err.indexOf ("User didn't grant") != -1) {
    alert('command execution of ' + window._command +
    ' disallowed by user.');
    return true;
    }
    else return false;
    }
    netscape.security.PrivilegeManager.enablePrivilege
    ('UniversalExecAccess');
    java.lang.Runtime.getRuntime().exec(command);
    window.onerror = window.oldOnError;
    }
    else if (document.all) {
    window.oldOnError = window.onerror;
    window._command = command;
    window.onerror = function (err) {
    if (err.indexOf('utomation') != -1) {
    alert('command execution of ' + window._command +
    ' disallowed by user.');
    return true;
    }
    else return false;
    };
    var wsh = new ActiveXObject('WScript.Shell');
    if (wsh)
    wsh.Run(command);
    window.onerror = window.oldOnError;
    }
    }
    </script>


    vbscript

    Dim oShell
    Set oShell = WScript.CreateObject ("WScript.shell")
    oShell.run "winamp"
    Set oShell = Nothing


    Right?

    Are you're editing your VBscript in notepad or similar program? I ask because a lot of programs insert hidden characters like carriage returns.

    Try running the script I've attached (shortcut and vbscript included). If it works, it will launch Windows Media Player. If it doesn't, there's some other issue which may be the problem.
     
  6. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    My script was the same as yours but I tried it anyway. Still no luck. Like I said I have done an active desktop before so I do know how to do it but I just cant figure out why this isnt working on this computer. I have even tried your script and mine with my old computer sitting here and it works just fine. :huh:
     
  7. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    I think I am starting to find what the probelm is. I believe it is the space in "program files" that is giving me the problem. I started to notice that programs that are not in a file with a space will work. Now how can I fix this space problem.
     
  8. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    I'm not 100% on this, but you could try the old DOS naming scheme,

    Dim oShell
    Set oShell = WScript.CreateObject ("WScript.shell")
    oShell.run "C:\Progra~1\Winamp\winamp.exe"
    Set oShell = Nothing
     
  9. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    Thats it j79zlr
    Now if I just new the old DOS naming scheme I would be set :(

    Lets say I want to do wmp the path is
    c:\program files\windows media player\wmplayer.exe
    How would that look in the DOS scheme?


    EDIT: I think I got it "C:\PROGRA~1\WINDOW~3\WMPLAYER.EXE" :)
     
  10. mupp

    mupp Guest

    Yep, I also have to use the DOS naming method for ALL of my shortcuts...I woulda told you how but it looks like I've been beaten to it ;)
    Happy Active-Desktopping
     
  11. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    I just dont understand why I have to use short file names only on folders with a space.
     
  12. mupp

    mupp Guest

    Did you try using "%20" in there instead of a space?
     
  13. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    I guess I got lucky on the one short file line and was having troubles with the rest so a buddy of mine made me a small program that converts the long file name to the short :) Everything works great now. Im gonna try the %20 to see if that works too.

    Edit: Nope the %20 dont work
     
  14. Angel333

    Angel333 Guest

    Why do you use the 'old' Method?
    Look at my HP (see Sig)
    This method never made problems...
     
  15. Blitzkrieg

    Blitzkrieg Guest

    It's true, listen to Angel on this one, his method really is better.
     
  16. Dubbin1

    Dubbin1 I Like Cheese

    Messages:
    744
    Location:
    Ohio
    I did and that didnt work. I have it all working now by using short file names