clivebuckwheat Posted April 15, 2006 Share Posted April 15, 2006 it doesn't map to my server driveNet use u: \\pentium4\unattended\Apps\FirefoxI put this command in the file and it didn't map Link to comment Share on other sites More sharing options...
cluberti Posted April 15, 2006 Share Posted April 15, 2006 (edited) Try calling this vbscript instead, as your batch file will run the vbscript and only continue when the network drive is available and mapped (useful when waiting for a slow wireless net connection to fire up too):Dim sTestPathDim intCountDim objnetSet objFSO = CreateObject("Scripting.FileSystemObject")Set objShell = CreateObject("WScript.Shell")Set objVolatileEnv = objShell.Environment("VOLATILE")Set objnet = CreateObject("Wscript.Network")' An UNC path here that will be available when network connection is in placesTestPath = "\\pentium4\unattendedintCount = 1' test on volatile environment variable to avoid running logon script' if the user has already run the logon script.If Not objVolatileEnv("LogonScript") = "Done" Then Do Until objFSO.FolderExists(sTestPath) ' sleep 5 seconds WScript.Sleep 5000 intCount = intCount + 1 If intCount = 60 Then MsgBox "Unable to connect to network share for 5 minutes. Please notify your network administrator." Exit Do End If Loop ' share/folder available on server now, so continue objnet.MapNetworkDrive "U:", "\\pentium4\unattended\Apps\Firefox","True","domain\user","password"End IfWatch out for word wrap there - the whole objnet.MapNetworkDrive section is one line, not two (as it may appear here on the boards). Edited April 15, 2006 by cluberti Link to comment Share on other sites More sharing options...
clivebuckwheat Posted April 15, 2006 Author Share Posted April 15, 2006 thanks but i'd rather just use a simple net use. I just don't understand why it didn't map. Do i need to do something special in the RunOnceEx.cmd to make it work?see I have a list of apps i want to install from the network. Link to comment Share on other sites More sharing options...
p4ntb0y Posted April 15, 2006 Share Posted April 15, 2006 Ok you want to add Reg values to install on next reboot but you want the install from a network location instead of local or cd?Is this right?have you got network going or is it just your server and the client? Link to comment Share on other sites More sharing options...
clivebuckwheat Posted April 15, 2006 Author Share Posted April 15, 2006 Yes you got itmy server where the apps are located and a client machine i am installing them to .All i want to do is a simple net use in the runonceex.cmd Link to comment Share on other sites More sharing options...
cluberti Posted April 15, 2006 Share Posted April 15, 2006 Perhaps your network interface isn't working? Try putting in an ipconfig /all statement, then a pause, and see if you've even got an IP address. Link to comment Share on other sites More sharing options...
mc134 Posted April 15, 2006 Share Posted April 15, 2006 I haven't gotten it to work from RunOnce so just call it from a command file someplace like this...REG ADD %KEY%\075 /VE /D "Mapping Network Drives" /fREG ADD %KEY%\075 /V 1 /D "%systemdrive%\install\Network\Network.cmd" /f Link to comment Share on other sites More sharing options...
clivebuckwheat Posted April 16, 2006 Author Share Posted April 16, 2006 ok during the install of windows xp. I map to u: \\pentium4\unattended\appsthis works fine. it maps. Inside the apps folder there is a firefox folder.in my runonceex.cmdi put REG ADD %KEY%\008 /VE /D "FireFox 1.5" /fREG ADD %KEY%\008 /V 1 /D "U:\Firefox\Firefox Setup 1.5.0.2.exe -ms" /fi get unable to find \firefox\firefoxwhat am i doing wrong. Link to comment Share on other sites More sharing options...
gunsmokingman Posted April 16, 2006 Share Posted April 16, 2006 I think the VBS script that cluberti posted would be the best way to go, you can start the install from it.Dim sTestPathDim intCountDim objnetSet objFSO = CreateObject("Scripting.FileSystemObject")Set objShell = CreateObject("WScript.Shell")Set objVolatileEnv = objShell.Environment("VOLATILE")Set objnet = CreateObject("Wscript.Network")' An UNC path here that will be available when network connection is in placesTestPath = "\\pentium4\unattendedintCount = 1' test on volatile environment variable to avoid running logon script' if the user has already run the logon script.If Not objVolatileEnv("LogonScript") = "Done" Then Do Until objFSO.FolderExists(sTestPath) ' sleep 5 seconds WScript.Sleep 5000 intCount = intCount + 1 If intCount = 60 Then MsgBox "Unable to connect to network share for 5 minutes. Please notify your network administrator." Exit Do End If Loop ' share/folder available on server now, so continue objnet.MapNetworkDrive "U:", "\\pentium4\unattended\Apps\Firefox","True","domain\user","password" '''' Checks to see if it in the correct directory If objFSO.FileExists("U:\Firefox\Firefox Setup 1.5.0.2.exe") Then objShell.Run(chr(34) & "U:\Firefox\Firefox Setup 1.5.0.2.exe -ms" & chr(34)),1,True Else objShell.Popup "Cannot Find This U:\Firefox\Firefox Setup 1.5.0.2.exe",10,"Missing", 0 + 32 End If End If Link to comment Share on other sites More sharing options...
gunsmokingman Posted April 16, 2006 Share Posted April 16, 2006 I think the VBS script that cluberti posted would be the best way to go, you can start the install from it.Dim sTestPathDim intCountDim objnetSet objFSO = CreateObject("Scripting.FileSystemObject")Set objShell = CreateObject("WScript.Shell")Set objVolatileEnv = objShell.Environment("VOLATILE")Set objnet = CreateObject("Wscript.Network")' An UNC path here that will be available when network connection is in placesTestPath = "\\pentium4\unattendedintCount = 1' test on volatile environment variable to avoid running logon script' if the user has already run the logon script.If Not objVolatileEnv("LogonScript") = "Done" Then Do Until objFSO.FolderExists(sTestPath) ' sleep 5 seconds WScript.Sleep 5000 intCount = intCount + 1 If intCount = 60 Then MsgBox "Unable to connect to network share for 5 minutes. Please notify your network administrator." Exit Do End If Loop ' share/folder available on server now, so continue objnet.MapNetworkDrive "U:", "\\pentium4\unattended\Apps\Firefox","True","domain\user","password" '''' Checks to see if it in the correct directory If objFSO.FileExists("U:\Firefox\Firefox Setup 1.5.0.2.exe") Then objShell.Run(chr(34) & "U:\Firefox\Firefox Setup 1.5.0.2.exe -ms" & chr(34)),1,True Else objShell.Popup "Cannot Find This U:\Firefox\Firefox Setup 1.5.0.2.exe",10,"Missing", 0 + 32 End If End If Link to comment Share on other sites More sharing options...
cluberti Posted April 16, 2006 Share Posted April 16, 2006 REG ADD %KEY%\008 /V 1 /D "U:\Firefox\Firefox Setup 1.5.0.2.exe -ms" /fNote the spaces in your path! You would need it to look like this for what you are currently doing to work:REG ADD %KEY%\008 /V 1 /D "\"U:\Firefox\Firefox Setup 1.5.0.2.exe\" -ms" /f Link to comment Share on other sites More sharing options...
clivebuckwheat Posted April 16, 2006 Author Share Posted April 16, 2006 thanks manthat did it.Now it seems I can't get spybot 1.4 to install and autoupdate. I have checked the forums and even read the spybot faq'sonce again what am i doing wrong?REG ADD %KEY%\009 /VE /D "Spybot Search and Destory 1.4" /fREG ADD %KEY%\009 /V 1 /D "\"U:\Spybot\spybotsd14.exe\" /verysilent /autoupdate" /f Link to comment Share on other sites More sharing options...
clivebuckwheat Posted April 17, 2006 Author Share Posted April 17, 2006 anyone? with spybot issues Link to comment Share on other sites More sharing options...
cluberti Posted April 17, 2006 Share Posted April 17, 2006 What actually happens? Is it that the executable doesn't launch, or it does but doesn't install? Link to comment Share on other sites More sharing options...
Ghostrider Posted April 17, 2006 Share Posted April 17, 2006 thanks manthat did it.Now it seems I can't get spybot 1.4 to install and autoupdate. I have checked the forums and even read the spybot faq'sonce again what am i doing wrong?REG ADD %KEY%\009 /VE /D "Spybot Search and Destory 1.4" /fREG ADD %KEY%\009 /V 1 /D "\"U:\Spybot\spybotsd14.exe\" /verysilent /autoupdate" /fTry it without the backslashREG ADD %KEY%\009 /V 1 /D ""U:\Spybot\spybotsd14.exe" /verysilent /autoupdate" /f 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