t2contra Posted March 29, 2008 Posted March 29, 2008 I want my RunOnceEx to check for the existence of application directory on my F Drive and to assign it to PP rather than to use the app dircectory on C drive.What I want is something like:cmdow @ /HID@Echo OffIF EXIST F:\WINXPHOME\$OEM$\$1\Install\Apps\RunOncEx2.cmd SET PP=F:\WINXPHOME\$OEM$\$1\Install\Apps\ELSE SET PP=SET PP=%SystemDrive%\Install\Apps\SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx.It does not work. Can someone help with the language part?
gunsmokingman Posted March 29, 2008 Posted March 29, 2008 Try this @Echo OffCLSColor 17Title Run Once ExIF EXIST F:\WINXPHOME\$OEM$\$1\Install\Apps\RunOncEx2.cmd Goto Install1IF Not EXIST F:\WINXPHOME\$OEM$\$1\Install\Apps\RunOncEx2.cmd Goto Install2:Install1SET PP=F:\WINXPHOME\$OEM$\$1\Install\Apps\Goto R1:Install2SET PP=%SystemDrive%\Install\Apps\Goto R1:R1SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx.
Yzöwl Posted March 29, 2008 Posted March 29, 2008 From the code you've provided I'd say you should try this:@Cmdow @ /HID || @Echo OffSetlocal(Set AP=F:\WINXPHOME\$OEM$\$1) & (Set AD=\Install\Apps\)(Set KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx)If Exist %AP%%AD%RunOncEx2.cmd (Set PP=%AP%%AD%) Else (Set PP=%SystemDrive%%AD%)
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