Still need some help... 
Author Message
 Still need some help...

Still need some help...That error will happen if you don't have the latest
ADSI drivers on the remote machine (2.5 is the latest). I haven't used ADSI
on Win95/8 yet so I don't know if the WinNT object is even valid for those
OSes.

Tim Andrews, MCSE, Sr. Systems Consultant
Langtech Systems Consulting
(800)480-8488 x495
http://www.*-*-*.com/


Thanks for your input, here's where I'm at now: Using the FileShare I get
the error message "Active Directory: An unknown Active Directory object was
requested." I searched through MSDN for this error and turned up next to
nothing.
It fails in line 7 which is the objComputer.Create ("FileShare","C$")
command.
As a sidenote, I'm not sure that I can do what was suggested by Alfredo and
just copy the link. Before getting into WSH I have tried creating shortcuts
and copying them using batch files. When you copy a shortcut to another PC
and try to execute it, even if the path is C:\bla\bla.exe it will prompt you
for the password to share back to the PC the shortcut was originally created
on. (Was that clear?) So, I was hoping to use WSH to make a shortcut on
another PC. That's kinda why I figured this was gonna be easier. I'm
invoking a createshortcut command, I just have to make it essentially
execute that method on the remote PC, while the script is being interpreted
by cscript on the admin PC. I admit I haven't tried it yet, but I am
guessing that if I use jscript to copy this shortcut across a share using
ADSI, then it's going to have the same problem. Does that make any sense?
Here's the script as I'm using it... and thanks for your help... I really
appreciate it!
--- jscript ---
//
****************************************************************************
****
// *
// * Create an IBM 3270 Terminal Shortcut on OFFICE97T-WS
// *
var objComputer = GetObject("WinNT://OFFICE97T-WS");
var objShare = objComputer.Create("FileShare", "C$");
objShare.path = "C:\\";
objShare.SetInfo;
var LaunchPath = "C:\Program Files\\NETMANAG.32\\TN3270.exe";
var LaunchArg = "147.154.1.10";
var StartIn = "C:\Program Files\\NETMANAG.32";
var IconPath = "C:\Program Files\\NETMANAG.32\\TN3270.exe";
var WSHShell = WScript.CreateObject("WScript.Shell");
var DesktopPath = WSHShell.SpecialFolders("AllUsersDesktop");
var MyShortcut = WSHShell.CreateShortcut(DesktopPath + "\\IBM 3270
Terminal.lnk");
MyShortcut.TargetPath = LaunchPath
MyShortcut.Arguments = LaunchArg
MyShortcut.WorkingDirectory = StartIn
MyShortcut.WindowStyle = 4
MyShortcut.IconLocation = IconPath
MyShortcut.Save();
objComputer.Delete("FileShare","C$");



Mon, 10 Dec 2001 03:00:00 GMT  
 Still need some help...

Try using the SHORTCUT.EXE file from the NT Resource Kit. Also read article Q158682 from Microsoft.

    Thanks for your input, here's where I'm at now: Using the FileShare I get the error message "Active Directory: An unknown Active Directory object was requested." I searched through MSDN for this error and turned up next to nothing.

    It fails in line 7 which is the objComputer.Create ("FileShare","C$") command.

    As a sidenote, I'm not sure that I can do what was suggested by Alfredo and just copy the link. Before getting into WSH I have tried creating shortcuts and copying them using batch files. When you copy a shortcut to another PC and try to execute it, even if the path is C:\bla\bla.exe it will prompt you for the password to share back to the PC the shortcut was originally created on. (Was that clear?) So, I was hoping to use WSH to make a shortcut on another PC. That's kinda why I figured this was gonna be easier. I'm invoking a createshortcut command, I just have to make it essentially execute that method on the remote PC, while the script is being interpreted by cscript on the admin PC. I admit I haven't tried it yet, but I am guessing that if I use jscript to copy this shortcut across a share using ADSI, then it's going to have the same problem. Does that make any sense?

    Here's the script as I'm using it... and thanks for your help... I really appreciate it!

    --- jscript ---
    // ********************************************************************************
    // *
    // * Create an IBM 3270 Terminal Shortcut on OFFICE97T-WS
    // *

    var objComputer = GetObject("WinNT://OFFICE97T-WS");
    var objShare = objComputer.Create("FileShare", "C$");
    objShare.path = "C:\\";
    objShare.SetInfo;

    var LaunchPath = "C:\Program Files\\NETMANAG.32\\TN3270.exe";
    var LaunchArg = "147.154.1.10";
    var StartIn = "C:\Program Files\\NETMANAG.32";
    var IconPath = "C:\Program Files\\NETMANAG.32\\TN3270.exe";

    var WSHShell = WScript.CreateObject("WScript.Shell");
    var DesktopPath = WSHShell.SpecialFolders("AllUsersDesktop");
    var MyShortcut = WSHShell.CreateShortcut(DesktopPath + "\\IBM 3270 Terminal.lnk");

    MyShortcut.TargetPath = LaunchPath
    MyShortcut.Arguments = LaunchArg
    MyShortcut.WorkingDirectory = StartIn
    MyShortcut.WindowStyle = 4
    MyShortcut.IconLocation = IconPath
    MyShortcut.Save();

    objComputer.Delete("FileShare","C$");



Tue, 11 Dec 2001 03:00:00 GMT  
 Still need some help...
Try using the SHORTCUT.EXE file in the NT Resource Kit. It can remove the
URL reference embedded into the shortcut.

NOTE: The embedded URL is NOT shown in the properties section. Drag the
shortcut into notepad to take a peek at what is actually there. As far as I
know, you CANNOT edit this with notepad, just view it.


    Thanks for your input, here's where I'm at now: Using the FileShare I
get the error message "Active Directory: An unknown Active Directory object
was requested." I searched through MSDN for this error and turned up next to
nothing.

    It fails in line 7 which is the objComputer.Create ("FileShare","C$")
command.

    As a sidenote, I'm not sure that I can do what was suggested by Alfredo
and just copy the link. Before getting into WSH I have tried creating
shortcuts and copying them using batch files. When you copy a shortcut to
another PC and try to execute it, even if the path is C:\bla\bla.exe it will
prompt you for the password to share back to the PC the shortcut was
originally created on. (Was that clear?) So, I was hoping to use WSH to make
a shortcut on another PC. That's kinda why I figured this was gonna be
easier. I'm invoking a createshortcut command, I just have to make it
essentially execute that method on the remote PC, while the script is being
interpreted by cscript on the admin PC. I admit I haven't tried it yet, but
I am guessing that if I use jscript to copy this shortcut across a share
using ADSI, then it's going to have the same problem. Does that make any
sense?

    Here's the script as I'm using it... and thanks for your help... I
really appreciate it!

    --- jscript ---
    //
****************************************************************************
****
    // *
    // * Create an IBM 3270 Terminal Shortcut on OFFICE97T-WS
    // *

    var objComputer = GetObject("WinNT://OFFICE97T-WS");
    var objShare = objComputer.Create("FileShare", "C$");
    objShare.path = "C:\\";
    objShare.SetInfo;

    var LaunchPath = "C:\Program Files\\NETMANAG.32\\TN3270.exe";
    var LaunchArg = "147.154.1.10";
    var StartIn = "C:\Program Files\\NETMANAG.32";
    var IconPath = "C:\Program Files\\NETMANAG.32\\TN3270.exe";

    var WSHShell = WScript.CreateObject("WScript.Shell");
    var DesktopPath = WSHShell.SpecialFolders("AllUsersDesktop");
    var MyShortcut = WSHShell.CreateShortcut(DesktopPath + "\\IBM 3270
Terminal.lnk");

    MyShortcut.TargetPath = LaunchPath
    MyShortcut.Arguments = LaunchArg
    MyShortcut.WorkingDirectory = StartIn
    MyShortcut.WindowStyle = 4
    MyShortcut.IconLocation = IconPath
    MyShortcut.Save();

    objComputer.Delete("FileShare","C$");



Tue, 11 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help needed, urgent-- newbie need GS+GV for PC

2. ++Help Needed: we need a strong Postscript Viewer other than Ghostscript.++

3. HELP: Need help with drop down menu's

4. Help Help needed Opening Outlook Contacts(public) in VB5

5. Need help - Help please!

6. Help: Need help printing with Gsview and Ghostview 4.03 on HP4L

7. HELP: Help needed compiling Aladdin Ghostscript on DEC AlphaStation running OSF/1

8. Need Help Finding a Postscript Programmer...Please Help

9. HELP!! Need help with Date

10. need help to port a vbscript to an html page

11. Help Needed With VB6!

12. Help needed with TABS

 

 
Powered by phpBB® Forum Software