Jump to content

Recommended Posts

Posted

I'm running a simple script with CMAK (Connection Manager Administration Kit) to check/make a registery change pre-connection, but during runtime %username% returns as NULL

%systemroot%\system32\cscript.exe "%systemdrive%\documents and settings\%username%\Application Data\Microsoft\Network\connections\cm\rdrukvpn\vpn_reg.vbs"

ERROR MESSAGE

"C:\documents and settings\NULL\Application Data\Microsoft\Network\connections\cm\rdrukvpn\kb311218.vbs" Was not found

When i manually run this script within a DOS prompt or from RUN, its fine. Also it makes not difference whether its run as a cscript or wscript, still the same error.

any one know why it would return NULL?

Thanks


Posted

\%username% i think need that %UserProfile%

I'm running a simple script with CMAK (Connection Manager Administration Kit) to check/make a registery change pre-connection, but during runtime %username% returns as NULL

%systemroot%\system32\cscript.exe "%systemdrive%\documents and settings\%username%\Application Data\Microsoft\Network\connections\cm\rdrukvpn\vpn_reg.vbs"

ERROR MESSAGE

"C:\documents and settings\NULL\Application Data\Microsoft\Network\connections\cm\rdrukvpn\kb311218.vbs" Was not found

When i manually run this script within a DOS prompt or from RUN, its fine. Also it makes not difference whether its run as a cscript or wscript, still the same error.

any one know why it would return NULL?

Thanks

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...