Starfighter Posted April 23, 2005 Share Posted April 23, 2005 Hi Gurus, I have a problem with the following code: Run('"regedit /S " & @WorkingDir & "\Registry-Einstellungen\Software\ClearProg.reg"') It appears a dialogbox with the following error: Error: Unable to execute the external program What's wrong? Please help me. Thanks Link to comment Share on other sites More sharing options...
MHz Posted April 23, 2005 Share Posted April 23, 2005 Do you mean @scriptdir, instead of @workingdir ? I do not believe you need to wrap regedit /s in the inverted comma's either. Consider trying it in a messagebox first, to show how it is interpreted. Try this: Run('regedit /S "' & @WorkingDir & '\Registry-Einstellungen\Software\ClearProg.reg"') Link to comment Share on other sites More sharing options...
Starfighter Posted April 23, 2005 Author Share Posted April 23, 2005 Do you mean @scriptdir, instead of @workingdir ?I do not believe you need to wrap regedit /s in the inverted comma's either.Consider trying it in a messagebox first, to show how it is interpreted.Try this:Run('regedit /S "' & @WorkingDir & '\Registry-Einstellungen\Software\ClearProg.reg"')<{POST_SNAPBACK}>Many thanks...your code works great Link to comment Share on other sites More sharing options...
Starfighter Posted April 23, 2005 Author Share Posted April 23, 2005 (edited) Ähm...I'm confused... Dim $Reg Dim $Search Dim $File ; Alle reg-Dateien im spezifizierten Verzeichnis anzeigen. $Search=FileFindFirstFile(@ScriptDir & "\Registry-Einstellungen\Test\*.reg") ; Prüfen, ob die Suche erfolgreich ist. If $Search=-1 Then MsgBox(0, "Error", "Keine Reg-Dateien gefunden!") Exit EndIf While 1 $File=FileFindNextFile($Search) If @error Then ExitLoop $Reg=@ScriptDir & "\Registry-Einstellungen\Test\" & $File RunWait('regedit.exe /S " & $Reg') WEnd ; Handle schliessen. FileClose($Search) I have a problem with the runwait-function... Please help me... Edited April 23, 2005 by Starfighter Link to comment Share on other sites More sharing options...
Developers Jos Posted April 23, 2005 Developers Share Posted April 23, 2005 (edited) Ähm...I'm confused... RunWait('regedit.exe /S " & $Reg')<{POST_SNAPBACK}>What editor are you using? with a proper editor that has syntax coloring you would get less confused with the string syntax...Try:RunWait('regedit.exe /S "' & $Reg & '"') Edited April 23, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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