cancel
Showing results for 
Search instead for 
Did you mean: 

Session Start Scripts in NC

Toivo_
Contributor

Re: Session Start Scripts in NC

Rehashing this topic -- I'm trying to avoid figuring how to distribute the script by just using native Windows binaries, so my session start script looks like '%windir%\System32\msg.exe * "You have successfully connected."'

After figuring that it bombs without the .exe, I now am stumped because it treats the entire line as a filename and tries to copy it to the local user's directory, which of course doesn't work -- so apparently this must be a script with no options.

I then attempted to point it at a URL, but that results in an err=123 -- what kind of paths are supported? The IVE admin guide is mum aside from talking about WSAM which seems excessively difficult. I just want users to get a visual indication that the connection has been established, instead of the NC client vanishing into the system tray and the remaining "Connecting, please wait" browser continuing to confuse the users.

We're a university environment, without a single AD, so there are no SMB paths that will be accessible to all users.

cbarcellos_
Regular Contributor

Re: Session Start Scripts in NC

Toivo,

This is a copy and paste from the 6.5 admin guide, from the WSAM section for Start scripts (The same rules should apply to NC):

  • NOTE: If you enable the Session start script option or Session end script option,
    note the following:
  • You must either install the specified file on your end-userÕs computers or
    specify a path on an accessible network directory.
  • To ensure that the IVE can locate a file on different platforms, you can use
    Windows variables, such as in a path such as %WINDIR%\system32\log

did you use WINDIR or windir? It may be case sensitive. I do know that it is common to use network shares ex: \\server\share\script.bat as a script location.

Also, the client side debuglog.log file should show why the script isnt launching.

Toivo_
Contributor

Re: Session Start Scripts in NC

That's the passage I was reading, and the WSAM part didn't really make sense in light of what I've read here or what the Juniper engineer told me as part of a JTAC case (just run a .bat)

I used lowercase -- but the problem was (according to the client troubleshooting) that it is trying to copy a file named "msg.exe * Stuff" to a temp directory, and that obviously fails. (Instead of copying msg.exe and then applying the command line options it takes the command line options to be part of the file name.)

Also, as stated, these users aren't necessarily logged onto a domain, so there's no share that's available to them, hence my attempt to use http. The IVE admin guide never specifies what kind of paths are valid: SMB, DFS, AFS, HTTP...

cbarcellos_
Regular Contributor

Re: Session Start Scripts in NC

Also:

  • Windows only supports scripts with the .bat or .cmd extension (referring to
    batch files, not the .cmd applications within MSDOS). To run a .vbs script, the
    user must have a batch file to call the .vbs script. Similarly, to run an .exe
    application (like C:\WINDOWS\system32\mstsc.exe), the user must have a
    batch file to call the .exe application.

It shouldn't matter if the script is local or on a drive share, it should be able to access it. In my experiences, if Start --> Run (paste link to script), click OK works, then it should work as a script location for NC.

Toivo_
Contributor

Re: Session Start Scripts in NC

Okay... Then using msg.exe which comes with Windows isn't going to work and we need to get a custom .bat on every client machine. Since there is no windows file share they can access to get it (since the clients aren't on a windows domain), and Windows natively doesn't execute files from a http URL/URI, is there any other way to automatically disseminate such a .bat file to the clients? (Or is there any other way to prevent NC from automagically minimizing into the system tray, leaving just the misleading browser window open?)

cbarcellos_
Regular Contributor

Re: Session Start Scripts in NC

That's right, a .exe wont work.

You could put a share on the internet (of course you'd want the machine to be on a DMZ). Samba would be your most secure bet as for a file server.

What are you trying to do with the start up script exactly? There might be other ways to accomplish this.

MattS_
Frequent Contributor

Re: Session Start Scripts in NC

You could use host Checker to detect if the script is on the client PC; if it is missing assign the user to a role which only has access to a website that provides the .bat file and detailed instructions/screenshots on installing it in the correct location.

df_
Contributor

Re: Session Start Scripts in NC

We have been using a .exe for years since 5.3, and now with 6.4 with Network Connect. Our .exe is on the local PCs, not on the network. Haven't had any problems getting it to launch a .exe from Network Connect. (Windows XP, not sure about Vista, and will be testing Win 7 soon)

Toivo_
Contributor

Re: Session Start Scripts in NC

I'd love to accomplish my goal with a more simple solution :-) The problem is that Network Connect, once launched from the portal, automatically minimizes into the system tray. There's no visual indication that the connection was successful, beyond the icon in the system tray. Even worse, in Windows 7 it goes into the bin and isn't even visible unless you expand the system tray.

So, basically we want NC to not automatically minimize, but JTAC advised me this is not possible, and to run a script that notifies the user instead.

Also, thank you for helping me with this, I do appreciate it.

Toivo_
Contributor

Re: Session Start Scripts in NC

But the .exe you run doesn't require any command line options or arguments, right?