cjoyce1980 Posted December 3, 2007 Share Posted December 3, 2007 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 foundWhen 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 Link to comment Share on other sites More sharing options...
seven77 Posted December 3, 2007 Share Posted December 3, 2007 \%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 foundWhen 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 Link to comment Share on other sites More sharing options...
Yzöwl Posted December 3, 2007 Share Posted December 3, 2007 What is wrong with:cscript //nologo "%appdata%\Microsoft\Network\connections\cm\rdrukvpn\vpn_reg.vbs" Link to comment Share on other sites More sharing options...
cjoyce1980 Posted December 3, 2007 Author Share Posted December 3, 2007 cheers guys, both suggestion worked.i'm just having one those mondays Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now